<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: RPC Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">RPC Interface</div>  </div>
</div><!--header-->
<div class="contents">

<p>Describes how to interface with eosd over HTTP RPC.  
<a href="#details">More...</a></p>
<h1><a class="anchor" id="tableofcontent"></a>
Table Of Contents</h1>
<ul>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#chainrpc">Chain API</a><ul>
<li><a href="#v1chaingetinfo">get_info</a></li>
<li><a href="#v1chaingetblock">get_block</a></li>
<li><a href="#v1chaingetaccount">get_account</a></li>
<li><a href="#v1chaingetcode">get_code</a></li>
<li><a href="#v1chaingettablerows">get_table_rows</a></li>
<li><a href="#v1chainabijsontobin">abi_json_to_bin</a></li>
<li><a href="#v1chainabibintojson">abi_bin_to_json</a></li>
<li><a href="#v1chainpushtransaction">push_transaction</a></li>
<li><a href="#v1chainpushtransactions">push_transactions</a></li>
<li><a href="#v1chaingetrequiredkeys">get_required_keys</a></li>
</ul>
</li>
<li><a href="#walletrpc">Wallet API</a><ul>
<li><a href="#v1walletcreate">wallet_create</a></li>
<li><a href="#v1walletopen">wallet_open</a></li>
<li><a href="#v1walletlock">wallet_lock</a></li>
<li><a href="#v1walletlockall">wallet_lock_all</a></li>
<li><a href="#v1walletimportkey">wallet_import_key</a></li>
<li><a href="#v1walletlist">wallet_list</a></li>
<li><a href="#v1walletlistkeys">wallet_list_keys</a></li>
<li><a href="#v1walletgetpublickeys">wallet_get_public_keys</a></li>
<li><a href="#v1walletsettimeout">wallet_set_timeout</a></li>
<li><a href="#v1walletsigntrx">wallet_sign_trx</a></li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="configuration"></a>
Configuration</h1>
<p><code>eosd</code> uses a REST RPC interface where plugins can register their own endpoints with the API server. This page will explain how to use some of the APIs to get information about the blockchain and send transactions.</p>
<p>Before you can query <code>eosd</code> you must first enable the necessary API plugin(s). Depending on which API you want to enable, add the following line to your <code>eosd</code>'s <code>config.ini</code>: </p><div class="fragment"><div class="line">plugin = eosio::chain_api_plugin <span class="comment">// Enable Chain API</span></div><div class="line">plugin = eosio::wallet_api_plugin <span class="comment">// Enable Wallet API</span></div></div><!-- fragment --><p> Alternatively, for Wallet API, you can also have the wallet functionality separate from <code>eosd</code>, by running <code>eos-walletd</code> separately.</p>
<p>For the following guide, we will assume that we have <code>eosd</code> running on <code>127.0.0.1:8888</code> (Chain API Plugin enabled, Wallet API Plugin disabled) and <code>eos-walletd</code> running on <code>127.0.0.1:8889</code>. </p><hr/>
<h1><a class="anchor" id="chainrpc"></a>
Chain API</h1>
<h2><a class="anchor" id="v1chaingetinfo"></a>
get_info</h2>
<p>Get latest information related to a node</p>
<h3><a class="anchor" id="examplegetinfo"></a>
Example get_info Usage</h3>
<div class="fragment"><div class="line">curl http:<span class="comment">//127.0.0.1:8888/v1/chain/get_info</span></div></div><!-- fragment --><h3><a class="anchor" id="examplegetinforesult"></a>
Example get_info Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;server_version&quot;</span>: <span class="stringliteral">&quot;b2eb1667&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;head_block_num&quot;</span>: 259590,</div><div class="line">  <span class="stringliteral">&quot;last_irreversible_block_num&quot;</span>: 259573,</div><div class="line">  <span class="stringliteral">&quot;head_block_id&quot;</span>: <span class="stringliteral">&quot;0003f60677f3707f0704f16177bf5f007ebd45eb6efbb749fb1c468747f72046&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;head_block_time&quot;</span>: <span class="stringliteral">&quot;2017-12-10T17:05:36&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;head_block_producer&quot;</span>: <span class="stringliteral">&quot;initp&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;recent_slots&quot;</span>: <span class="stringliteral">&quot;1111111111111111111111111111111111111111111111111111111111111111&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;participation_rate&quot;</span>: <span class="stringliteral">&quot;1.00000000000000000&quot;</span></div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingetblock"></a>
get_block</h2>
<p>Get information related to a block.</p>
<h3><a class="anchor" id="examplegetblock"></a>
Example get_block Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_block -X POST -d &#39;{&quot;block_num_or_id&quot;:5}&#39;</span></div><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_block -X POST -d &#39;{&quot;block_num_or_id&quot;:0000000445a9f27898383fd7de32835d5d6a978cc14ce40d9f327b5329de796b}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplegetblockresult"></a>
Example get_block Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;previous&quot;</span>: <span class="stringliteral">&quot;0000000445a9f27898383fd7de32835d5d6a978cc14ce40d9f327b5329de796b&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;timestamp&quot;</span>: <span class="stringliteral">&quot;2017-07-18T20:16:36&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;transaction_merkle_root&quot;</span>: <span class="stringliteral">&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;producer&quot;</span>: <span class="stringliteral">&quot;initf&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;producer_changes&quot;</span>: [ ],</div><div class="line">  <span class="stringliteral">&quot;producer_signature&quot;</span>: <span class="stringliteral">&quot;204cb94b3186c3b4a7f88be4e9db9f8af2ffdb7ef0f27a065c8177a5fcfacf876f684e59c39fb009903c0c59220b147bb07f1144df1c65d26c57b534a76dd29073&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;cycles&quot;</span>: [ ],</div><div class="line">  <span class="stringliteral">&quot;id&quot;</span>:<span class="stringliteral">&quot;000000050c0175cbf218a70131ddc3c3fab8b6e954edef77e0bfe7c36b599b1d&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;block_num&quot;</span>:5,</div><div class="line">  <span class="stringliteral">&quot;ref_block_prefix&quot;</span>:27728114</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingetaccount"></a>
get_account</h2>
<p>Get information related to an account.</p>
<h3><a class="anchor" id="examplegetaccount"></a>
Example get_account Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_account -X POST -d &#39;{&quot;name&quot;:&quot;inita&quot;}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplegetaccountresult"></a>
Example get_account Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;inita&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;eos_balance&quot;</span>: <span class="stringliteral">&quot;999998.9574 EOS&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;staked_balance&quot;</span>: <span class="stringliteral">&quot;0.0000 EOS&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;unstaking_balance&quot;</span>: <span class="stringliteral">&quot;0.0000 EOS&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;last_unstaking_time&quot;</span>: <span class="stringliteral">&quot;2106-02-07T06:28:15&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;permissions&quot;</span>: [</div><div class="line">    {</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;active&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;parent&quot;</span>: <span class="stringliteral">&quot;owner&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;required_auth&quot;</span>: {</div><div class="line">        <span class="stringliteral">&quot;threshold&quot;</span>: 1,</div><div class="line">        <span class="stringliteral">&quot;keys&quot;</span>: [</div><div class="line">          {</div><div class="line">            <span class="stringliteral">&quot;key&quot;</span>: <span class="stringliteral">&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;</span>,</div><div class="line">            <span class="stringliteral">&quot;weight&quot;</span>: 1</div><div class="line">          }</div><div class="line">        ],</div><div class="line">        <span class="stringliteral">&quot;accounts&quot;</span>: []</div><div class="line">      }</div><div class="line">    },</div><div class="line">    {</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;owner&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;parent&quot;</span>: <span class="stringliteral">&quot;owner&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;required_auth&quot;</span>: {</div><div class="line">        <span class="stringliteral">&quot;threshold&quot;</span>: 1,</div><div class="line">        <span class="stringliteral">&quot;keys&quot;</span>: [</div><div class="line">          {</div><div class="line">            <span class="stringliteral">&quot;key&quot;</span>: <span class="stringliteral">&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;</span>,</div><div class="line">            <span class="stringliteral">&quot;weight&quot;</span>: 1</div><div class="line">          }</div><div class="line">        ],</div><div class="line">        <span class="stringliteral">&quot;accounts&quot;</span>: []</div><div class="line">      }</div><div class="line">    }</div><div class="line">  ]</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingetcode"></a>
get_code</h2>
<p>Fetch smart contract code.</p>
<h3><a class="anchor" id="examplegetcode"></a>
Example get_code Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_code -X POST -d &#39;{&quot;account_name&quot;:&quot;currency&quot;}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplegetcoderesult"></a>
Example get_code Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;currency&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;code_hash&quot;</span>:<span class="stringliteral">&quot;a1c8c84b4700c09c8edb83522237439e33cf011a4d7ace51075998bd002e04c9&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;wast&quot;</span>:<span class="stringliteral">&quot;(module\n  (type $0 (func (param i64 i64 i32) (result i32)))\n ...truncated&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;abi&quot;</span>: {</div><div class="line">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD</div><div class="line">  <span class="stringliteral">&quot;types&quot;</span>: [{</div><div class="line">      <span class="stringliteral">&quot;new_type_name&quot;</span>: <span class="stringliteral">&quot;account_name&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;type&quot;</span>: <span class="stringliteral">&quot;name&quot;</span></div><div class="line">    }</div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;structs&quot;</span>: [{</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;transfer&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;base&quot;</span>: <span class="stringliteral">&quot;&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;fields&quot;</span>: [</div><div class="line">        {<span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;from&quot;</span>, <span class="stringliteral">&quot;type&quot;</span>:<span class="stringliteral">&quot;account_name&quot;</span>},</div><div class="line">        {<span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;to&quot;</span>, <span class="stringliteral">&quot;type&quot;</span>:<span class="stringliteral">&quot;account_name&quot;</span>},</div><div class="line">        {<span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;quantity&quot;</span>, <span class="stringliteral">&quot;type&quot;</span>:<span class="stringliteral">&quot;uint64&quot;</span>}</div><div class="line">      ]</div><div class="line">    },{</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;account&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;base&quot;</span>: <span class="stringliteral">&quot;&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;fields&quot;</span>: [</div><div class="line">        {<span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;key&quot;</span>, <span class="stringliteral">&quot;type&quot;</span>:<span class="stringliteral">&quot;name&quot;</span>},</div><div class="line">        {<span class="stringliteral">&quot;name&quot;</span>:<span class="stringliteral">&quot;balance&quot;</span>, <span class="stringliteral">&quot;type&quot;</span>:<span class="stringliteral">&quot;uint64&quot;</span>}</div><div class="line">      ]</div><div class="line">    }</div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;actions&quot;</span>: [{</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;transfer&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;type&quot;</span>: <span class="stringliteral">&quot;transfer&quot;</span></div><div class="line">    }</div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;tables&quot;</span>: [{</div><div class="line">      <span class="stringliteral">&quot;name&quot;</span>: <span class="stringliteral">&quot;account&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;type&quot;</span>: <span class="stringliteral">&quot;account&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;index_type&quot;</span>: <span class="stringliteral">&quot;i64&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;key_names&quot;</span> : [<span class="stringliteral">&quot;key&quot;</span>],</div><div class="line">      <span class="stringliteral">&quot;key_types&quot;</span> : [<span class="stringliteral">&quot;name&quot;</span>]</div><div class="line">    }</div><div class="line">  ]</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingettablerows"></a>
get_table_rows</h2>
<p>Fetch smart contract data from an account.</p>
<h3><a class="anchor" id="examplegettablerows"></a>
get_table_rows Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_table_rows -X POST -d &#39;{&quot;scope&quot;:&quot;inita&quot;, &quot;code&quot;:&quot;currency&quot;, &quot;table&quot;:&quot;account&quot;, &quot;json&quot;: true}&#39;</span></div><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_table_rows -X POST -d &#39;{&quot;scope&quot;:&quot;inita&quot;, &quot;code&quot;:&quot;currency&quot;, &quot;table&quot;:&quot;account&quot;, &quot;json&quot;: true, &quot;lower_bound&quot;:0, &quot;upper_bound&quot;:-1, &quot;limit&quot;:10}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplegettablerowsresult"></a>
Example get_table_rows Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;rows&quot;</span>: [</div><div class="line">    {</div><div class="line">      <span class="stringliteral">&quot;account&quot;</span>: <span class="stringliteral">&quot;account&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;balance&quot;</span>: 1000</div><div class="line">    }</div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;more&quot;</span>: <span class="keyword">false</span></div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingeabijsontobin"></a>
abi_json_to_bin</h2>
<p>Serialize json to binary hex. The resulting binary hex is usually used for the data field in <a href="#v1chainpushtransaction">push_transaction</a>.</p>
<h3><a class="anchor" id="exampleabijsontobin"></a>
Example abi_json_to_bin Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/abi_json_to_bin -X POST -d &#39;{&quot;code&quot;:&quot;currency&quot;, &quot;action&quot;:&quot;transfer&quot;, &quot;args&quot;:{&quot;from&quot;:&quot;initb&quot;, &quot;to&quot;:&quot;initc&quot;, &quot;quantity&quot;:1000}}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="exampleabijsontobinresult"></a>
Example abi_json_to_bin Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;binargs&quot;</span>: <span class="stringliteral">&quot;000000008093dd74000000000094dd74e803000000000000&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;required_scope&quot;</span>: [],</div><div class="line">  <span class="stringliteral">&quot;required_auth&quot;</span>: []</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingeabibintojson"></a>
abi_bin_to_json</h2>
<p>Serialize back binary hex to json.</p>
<h3><a class="anchor" id="exampleabibintojson"></a>
Example abi_bin_to_json Usage</h3>
<div class="fragment"><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/abi_bin_to_json -X POST -d &#39;{&quot;code&quot;:&quot;currency&quot;, &quot;action&quot;:&quot;transfer&quot;, &quot;binargs&quot;:&quot;000000008093dd74000000000094dd74e803000000000000&quot;}&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="exampleabibintojsonresult"></a>
Example abi_bin_to_json Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;args&quot;</span>: {</div><div class="line">    <span class="stringliteral">&quot;from&quot;</span>: <span class="stringliteral">&quot;initb&quot;</span>,</div><div class="line">    <span class="stringliteral">&quot;to&quot;</span>: <span class="stringliteral">&quot;initc&quot;</span>,</div><div class="line">    <span class="stringliteral">&quot;quantity&quot;</span>: 1000</div><div class="line">  },</div><div class="line">  <span class="stringliteral">&quot;required_scope&quot;</span>: [],</div><div class="line">  <span class="stringliteral">&quot;required_auth&quot;</span>: []</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="v1chainpushtransaction"></a>
push_transaction</h2>
<p>This method expects a transaction in JSON format and will attempt to apply it to the blockchain,</p>
<p><b>Success Response</b> </p>
<p>On success it will return HTTP 200 and the transaction ID. </p>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&#39;transaction_id&#39;</span> : <span class="stringliteral">&quot;...&quot;</span></div><div class="line">}</div></div><!-- fragment --><p>Just because the transaction is pushed locally does not mean that the transaction has been incorporated into a block.</p>
<p><b>Error Response</b> </p>
<p>If an error occurs it will return either HTTP 400 (Invalid arguments) or 500 (Internal Server Error) </p>
<div class="fragment"><div class="line">HTTP/1.1 500 Internal Server Error</div><div class="line">Content-Length: 1466</div><div class="line"></div><div class="line">...error message...</div></div><!-- fragment --><h3><a class="anchor" id="examplepushtrx"></a>
Example push_transaction Usage</h3>
<p>This example assumes a transfer operation. The <code>ref_block_num</code> and <code>ref_block_prefix</code> here are provided as a result of <code>/v1/chain/get_block</code> of the last_irreversible_block. You also need to use /v1/wallet/sign_transaction to get the right signature. </p><div class="fragment"><div class="line">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD</div><div class="line">curl  http:<span class="comment">//localhost:8888/v1/chain/push_transaction -X POST -d &#39;{&quot;ref_block_num&quot;:&quot;100&quot;,&quot;ref_block_prefix&quot;:&quot;137469861&quot;,&quot;expiration&quot;:&quot;2017-09-25T06:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;actions&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;recipients&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000000041934b000000008041934be803000000000000&quot;}],&quot;signatures&quot;:[],&quot;authorizations&quot;:[]}&#39;</span></div><div class="line">=======</div><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/push_transaction -X POST -d &#39;{&quot;ref_block_num&quot;:21453,&quot;ref_block_prefix&quot;:3165644999,&quot;expiration&quot;:&quot;2017-12-08T10:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;read_scope&quot;:[],&quot;messages&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000008093dd74000000000094dd74e803000000000000&quot;}],&quot;signatures&quot;:[&quot;1f393cc5ce6a6951fb53b11812345bcf14ffd978b07be386fd639eaf440bca7dca16b14833ec661ca0703d15e55a2a599a36d55ce78c4539433f6ce8bcee0158c3&quot;]}&#39;</span></div><div class="line">&gt;&gt;&gt;&gt;&gt;&gt;&gt; e2f4c048... update chain api</div></div><!-- fragment --><h2><a class="anchor" id="v1chainpushtransactions"></a>
push_transactions</h2>
<p>This method push multiple transactions at once.</p>
<h3><a class="anchor" id="examplepushtrxs"></a>
Example push_transactions Usage</h3>
<div class="fragment"><div class="line">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD</div><div class="line">curl  http:<span class="comment">//localhost:8888/v1/chain/push_transaction -X POST -d &#39;[{&quot;ref_block_num&quot;:&quot;101&quot;,&quot;ref_block_prefix&quot;:&quot;4159312339&quot;,&quot;expiration&quot;:&quot;2017-09-25T06:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;actions&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;recipients&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000000041934b000000008041934be803000000000000&quot;}],&quot;signatures&quot;:[],&quot;authorizations&quot;:[]}, {&quot;ref_block_num&quot;:&quot;101&quot;,&quot;ref_block_prefix&quot;:&quot;4159312339&quot;,&quot;expiration&quot;:&quot;2017-09-25T06:28:49&quot;,&quot;scope&quot;:[&quot;inita&quot;,&quot;initc&quot;],&quot;actions&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;recipients&quot;:[&quot;inita&quot;,&quot;initc&quot;],&quot;authorization&quot;:[{&quot;account&quot;:&quot;inita&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000008040934b000000008041934be803000000000000&quot;}],&quot;signatures&quot;:[],&quot;authorizations&quot;:[]}]&#39;</span></div><div class="line">=======</div><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/push_transaction -X POST -d &#39;[{&quot;ref_block_num&quot;:21453,&quot;ref_block_prefix&quot;:3165644999,&quot;expiration&quot;:&quot;2017-12-08T10:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;read_scope&quot;:[],&quot;messages&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000008093dd74000000000094dd74e803000000000000&quot;}],&quot;signatures&quot;:[&quot;1f393cc5ce6a6951fb53b11812345bcf14ffd978b07be386fd639eaf440bca7dca16b14833ec661ca0703d15e55a2a599a36d55ce78c4539433f6ce8bcee0158c3&quot;]},...]&#39;</span></div><div class="line">&gt;&gt;&gt;&gt;&gt;&gt;&gt; e2f4c048... update chain api</div></div><!-- fragment --><h2><a class="anchor" id="v1chaingetrequiredkeys"></a>
get_required_keys</h2>
<p>Get required keys to sign a transaction from list of your keys.</p>
<h3><a class="anchor" id="examplegetrequiredkeys"></a>
Example get_required_keys Usage</h3>
<div class="fragment"><div class="line">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD</div><div class="line">curl  http:<span class="comment">//localhost:8888/v1/chain/get_required_keys -X POST -d &#39;{&quot;transaction&quot;: {&quot;ref_block_num&quot;:&quot;100&quot;,&quot;ref_block_prefix&quot;:&quot;137469861&quot;,&quot;expiration&quot;:&quot;2017-09-25T06:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;actions&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;recipients&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000000041934b000000008041934be803000000000000&quot;}],&quot;signatures&quot;:[],&quot;authorizations&quot;:[]}, &quot;available_keys&quot;:[&quot;EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq&quot;,&quot;EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA&quot;,&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;]}&#39;</span></div><div class="line">=======</div><div class="line">$ curl  http:<span class="comment">//127.0.0.1:8888/v1/chain/get_required_keys -X POST -d &#39;{&quot;transaction&quot;: {&quot;ref_block_num&quot;:&quot;100&quot;,&quot;ref_block_prefix&quot;:&quot;137469861&quot;,&quot;expiration&quot;:&quot;2017-09-25T06:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;messages&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;recipients&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000000041934b000000008041934be803000000000000&quot;}],&quot;signatures&quot;:[],&quot;authorizations&quot;:[]}, &quot;available_keys&quot;:[&quot;EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq&quot;,&quot;EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA&quot;,&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;]}&#39;</span></div><div class="line">&gt;&gt;&gt;&gt;&gt;&gt;&gt; e2f4c048... update chain api</div></div><!-- fragment --><h3><a class="anchor" id="examplegetrequiredkeysresult"></a>
Example get_required_keys Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;required_keys&quot;</span>: [</div><div class="line">    <span class="stringliteral">&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;</span></div><div class="line">  ]</div><div class="line">}</div></div><!-- fragment --><h1><a class="anchor" id="walletrpc"></a>
Wallet API</h1>
<h2><a class="anchor" id="v1walletcreate"></a>
wallet_create</h2>
<p>Create a new wallet with the given name</p>
<h3><a class="anchor" id="examplewalletcreate"></a>
Example wallet_create Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/create -X POST -d &#39;&quot;default&quot;&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletcreateresult"></a>
Example wallet_create Result</h3>
<p>This command will return the password that can be used to unlock the wallet in the future </p><div class="fragment"><div class="line">PW5KFWYKqvt63d4iNvedfDEPVZL227D3RQ1zpVFzuUwhMAJmRAYyX</div></div><!-- fragment --><h2><a class="anchor" id="v1walletopen"></a>
wallet_open</h2>
<p>Open an existing wallet of the given name</p>
<h3><a class="anchor" id="examplewalletopen"></a>
Example wallet_open Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/open -X POST -d &#39;&quot;default&quot;&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletopenresult"></a>
Example wallet_open Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletlock"></a>
wallet_lock</h2>
<p>Lock a wallet of the given name</p>
<h3><a class="anchor" id="examplewalletlock"></a>
Example wallet_lock Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/lock -X POST -d &#39;&quot;default&quot;&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletlockresult"></a>
Example wallet_lock Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletlockall"></a>
wallet_lock_all</h2>
<p>Lock all wallets</p>
<h3><a class="anchor" id="examplewalletlockall"></a>
Example wallet_lock_all Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/lock_all </span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletlockallresult"></a>
Example wallet_lock_all Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletunlock"></a>
wallet_unlock</h2>
<p>Unlock a wallet with the given name and password</p>
<h3><a class="anchor" id="examplewalletunlock"></a>
Example wallet_unlock Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/unlock -X POST -d &#39;[&quot;default&quot;, &quot;PW5KFWYKqvt63d4iNvedfDEPVZL227D3RQ1zpVFzuUwhMAJmRAYyX&quot;]&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletunlockresult"></a>
Example wallet_unlock Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletimport"></a>
wallet_import_key</h2>
<p>Import a private key to the wallet of the given name</p>
<h3><a class="anchor" id="examplewalletimport"></a>
Example wallet_import_key Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/import_key -X POST -d &#39;[&quot;default&quot;,&quot;5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3&quot;]&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletimportresult"></a>
Example wallet_import_key Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletlist"></a>
wallet_list</h2>
<p>List all wallets</p>
<h3><a class="anchor" id="examplewalletlist"></a>
Example wallet_list Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/list_wallets</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletlistresult"></a>
Example wallet_list Result</h3>
<div class="fragment"><div class="line">[<span class="stringliteral">&quot;default *&quot;</span>]</div></div><!-- fragment --><h2><a class="anchor" id="v1walletlistkeys"></a>
wallet_list_keys</h2>
<p>List all key pairs across all wallets</p>
<h3><a class="anchor" id="examplewalletlistkeys"></a>
Example wallet_list_keys Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/list_keys</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletlistkeysresult"></a>
Example wallet_list_keys Result</h3>
<div class="fragment"><div class="line">[[<span class="stringliteral">&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;</span>,<span class="stringliteral">&quot;5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3&quot;</span>]]</div></div><!-- fragment --><h2><a class="anchor" id="v1walletgetpublickeys"></a>
wallet_get_public_keys</h2>
<p>List all public keys across all wallets</p>
<h3><a class="anchor" id="examplewalletgetpublickeys"></a>
Example wallet_get_public_keys Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/get_public_keys </span></div></div><!-- fragment --><h3><a class="anchor" id="examplewallegetpublickeysresult"></a>
Example wallet_get_public_keys Result</h3>
<div class="fragment"><div class="line">[<span class="stringliteral">&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;</span>]</div></div><!-- fragment --><h2><a class="anchor" id="v1walletsettimeout"></a>
wallet_set_timeout</h2>
<p>Set wallet auto lock timeout (in seconds)</p>
<h3><a class="anchor" id="examplewalletsettimeout"></a>
Example wallet_set_timeout Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/set_timeout -X POST -d &#39;10&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletsettimeoutresult"></a>
Example wallet_set_timeout Result</h3>
<div class="fragment"><div class="line">{}</div></div><!-- fragment --><h2><a class="anchor" id="v1walletsigntrx"></a>
wallet_sign_trx</h2>
<p>Sign transaction given an array of transaction, require public keys, and chain id</p>
<h3><a class="anchor" id="examplewalletsigntrx"></a>
Example wallet_sign_trx Usage</h3>
<div class="fragment"><div class="line">$ curl http:<span class="comment">//localhost:8889/v1/wallet/sign_transaction -X POST -d &#39;[{&quot;ref_block_num&quot;:21453,&quot;ref_block_prefix&quot;:3165644999,&quot;expiration&quot;:&quot;2017-12-08T10:28:49&quot;,&quot;scope&quot;:[&quot;initb&quot;,&quot;initc&quot;],&quot;read_scope&quot;:[],&quot;messages&quot;:[{&quot;code&quot;:&quot;currency&quot;,&quot;type&quot;:&quot;transfer&quot;,&quot;authorization&quot;:[{&quot;account&quot;:&quot;initb&quot;,&quot;permission&quot;:&quot;active&quot;}],&quot;data&quot;:&quot;000000008093dd74000000000094dd74e803000000000000&quot;}],&quot;signatures&quot;:[]}, [&quot;EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV&quot;], &quot;&quot;]&#39;</span></div></div><!-- fragment --><h3><a class="anchor" id="examplewalletsigntrxresult"></a>
Example wallet_sign_trx Result</h3>
<div class="fragment"><div class="line">{</div><div class="line">  <span class="stringliteral">&quot;ref_block_num&quot;</span>: 21453,</div><div class="line">  <span class="stringliteral">&quot;ref_block_prefix&quot;</span>: 3165644999,</div><div class="line">  <span class="stringliteral">&quot;expiration&quot;</span>: <span class="stringliteral">&quot;2017-12-08T10:28:49&quot;</span>,</div><div class="line">  <span class="stringliteral">&quot;scope&quot;</span>: [</div><div class="line">    <span class="stringliteral">&quot;initb&quot;</span>,</div><div class="line">    <span class="stringliteral">&quot;initc&quot;</span></div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;read_scope&quot;</span>: [],</div><div class="line">  <span class="stringliteral">&quot;messages&quot;</span>: [</div><div class="line">    {</div><div class="line">      <span class="stringliteral">&quot;code&quot;</span>: <span class="stringliteral">&quot;currency&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;type&quot;</span>: <span class="stringliteral">&quot;transfer&quot;</span>,</div><div class="line">      <span class="stringliteral">&quot;authorization&quot;</span>: [</div><div class="line">        {</div><div class="line">          <span class="stringliteral">&quot;account&quot;</span>: <span class="stringliteral">&quot;initb&quot;</span>,</div><div class="line">          <span class="stringliteral">&quot;permission&quot;</span>: <span class="stringliteral">&quot;active&quot;</span></div><div class="line">        }</div><div class="line">      ],</div><div class="line">      <span class="stringliteral">&quot;data&quot;</span>: <span class="stringliteral">&quot;000000008093dd74000000000094dd74e803000000000000&quot;</span></div><div class="line">    }</div><div class="line">  ],</div><div class="line">  <span class="stringliteral">&quot;signatures&quot;</span>: [</div><div class="line">    <span class="stringliteral">&quot;1f393cc5ce6a6951fb53b11812345bcf14ffd978b07be386fd639eaf440bca7dca16b14833ec661ca0703d15e55a2a599a36d55ce78c4539433f6ce8bcee0158c3&quot;</span></div><div class="line">  ]</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
